/**
 * 项目名称:
 *
 * @Author: 夏国倩
 * @Date: 2023/9/12 18:56
 * @Copyright
 */
package itSystemCase2;
//卡车类
public class Lorry extends Car{
    private int tonnage;//吨位

    public Lorry(String licenseplate, String brand, int dailyrent, int tonnage) {
        super(licenseplate,brand,dailyrent);
        this.tonnage = tonnage;
    }

    public int getTonnage() {
        return tonnage;
    }

    public void setTonnage(int tonnage) {
        this.tonnage = tonnage;
    }

    @Override
    public float calRent(int days) {
        float price=this.getTonnage()*days*this.getDailyrent();
        return price;
    }
}
